import { defineStore } from 'pinia'

const useCounterStore = defineStore({
  id: 'counter',
  state: () => {
    return {
      number: 0
    }
  },
  getters: {
    double: (state) => state.number * 2
  },
  actions: {
    increment() {
      this.number++
    }
  }
})

export default useCounterStore
